package cn.xnatural.demo.entity;

import cn.xnatural.jpa.LongIdEntity;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Index;
import javax.persistence.Table;


@Entity
@Table(name = "tb_lock", indexes = {@Index(name = "idx_name", columnList = "name", unique = true)})
public class Lock extends LongIdEntity {
    /**
     * 锁 的 唯一标识
     */
    @Column(nullable = false)
    private String name;
    /**
     * 描述
     */
    private String comment;

    public String getName() { return name; }

    public Lock setName(String name) {
        this.name = name;
        return this;
    }

    public String getComment() { return comment; }

    public Lock setComment(String comment) {
        this.comment = comment;
        return this;
    }
}
